package br.com.news.business;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import br.com.news.business.utils.GenericBusiness;
import br.com.news.utils.business.exception.BusinessException;
import br.com.news.utils.business.interfaces.IUsuarioAndroidBusiness;
import br.com.news.utils.database.beans.UsuarioAndroidBean;
import br.com.news.utils.database.exception.DataBaseServiceException;
import br.com.news.utils.database.interfaces.IUsuarioAndroidServiceDb;

@Named
public class UsuarioAndroidBusiness extends GenericBusiness implements IUsuarioAndroidBusiness{
	
	@Inject
	private IUsuarioAndroidServiceDb usuarioAndroidServiceDb;

	@Override
	public List<UsuarioAndroidBean> findAll() throws BusinessException {
		try {
			return usuarioAndroidServiceDb.findAll();
		} catch (DataBaseServiceException e) {
			throw new BusinessException(e);
		}
	}	

}
